//
//  LTSDKHelper.h
//  LTIM
//
//  Created by 俊松何 on 2017/3/31.
//  Copyright © 2017年 俊松何. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MTUserModel.h"
#import "giftModel.h"
@interface LTSDKHelper : NSObject


+(instancetype)shareHelper;

+(LTUser *)usertransformMTUser:(MTUserModel *)mtuser;

+(LTUser *)usertransformWithGroup:(LTGroup *)groupModel;

+(LTUser *)usertransformWithuser:(LTUser *)user;


+(NSString *)MessageFromatString:(LTMessage *)message;


+(LTMessage *)sendMessagetoUserId:(NSString *)touserId
                           toUser:(LTUser *)toUser
                      messageType:(LTMessageType)messageType
                         chatType:(LTChatType)chattype
                       messageExt:(NSDictionary *)messageExt;

/**
 文字消息

 @param text 消息类容
 @param touserId 接受发userid
 @param toUser 接收方user 对象
 @param messageType 消息类型
 @param chattype 聊天类型
 @param messageExt 扩展字段
 @return 消息实体
 */
+ (LTMessage *)sendTextMessage:(NSString *)text
                      toUserId:(NSString *)touserId
                        toUser:(LTUser *)toUser
                   messageType:(LTMessageType)messageType
                      chatType:(LTChatType)chattype
                    messageExt:(NSDictionary *)messageExt;


/**
 发送打招呼消息

 @param text 文本
 @param touserId userId
 @param toUser 接收方User
 @return 返回message
 */
+ (LTMessage *)sendSayHelloMessage:(NSString *)text
                      toUserId:(NSString *)touserId
                        toUser:(LTUser *)toUser;





//发送文本At消息
+ (LTMessage *)sendAtTextMessage:(NSString *)text
                      toUserId:(NSString *)touserId
                        toUser:(LTUser *)toUser
                     atUserIds:(NSArray *)userIds
                   messageType:(LTMessageType)messageType
                      chatType:(LTChatType)chattype;





/**
 图片消息

 @param image 图片
 @param touserId 接受发userid
 @param toUser 接收方user 对象
 @param messageType 消息类型
 @param chattype 聊天类型
 @param displayname 图片名字
 @param messageExt  扩展字段
 @return 消息实体
 */
+ (LTMessage *)sendImageMessage:(UIImage *)image
                       toUserId:(NSString *)touserId
                         toUser:(LTUser *)toUser
                    messageType:(LTMessageType)messageType
                       chatType:(LTChatType)chattype
                    displayname:(NSString *)displayname
                     messageExt:(NSDictionary *)messageExt;

//发送语音消息
+ (LTMessage *)sendVoiceMessage:(NSData *)voiceData
                       toUserId:(NSString *)touserId
                         toUser:(LTUser *)toUser
                    messageType:(LTMessageType)messageType
                       chatType:(LTChatType)chattype
                       duration:(NSInteger )duration
                     messageExt:(NSDictionary *)messageExt;


//视频消息
+ (LTMessage *)sendVideoMessage:(NSData *)videoData
                     coverimage:(UIImage *)coverimage
                       toUserId:(NSString *)touserId
                         toUser:(LTUser *)toUser
                    messageType:(LTMessageType)messageType
                       chatType:(LTChatType)chattype
                       duration:(NSInteger )duration
                     messageExt:(NSDictionary *)messageExt;
//位置消息
+ (LTMessage *)sendLocationMessage:(NSString *)address
                          latitude:(double)latitude
                         longitude:(double)longitude
                          toUserId:(NSString *)touserId
                            toUser:(LTUser *)toUser
                          chatType:(LTChatType)chattype
                        messageExt:(NSDictionary *)messageExt;

//大表情消息
+ (LTMessage *)sendBigBqMessageWithname:(NSString *)name
                            txt_msgType:(NSString *)txt_msgType
                               msg_data:(NSArray *)msg_data
                               toUserId:(NSString *)touserId
                                 toUser:(LTUser *)toUser
                               chatType:(LTChatType)chattype;

//红包消息
+ (LTMessage *)sendRedEnvelopeMessage:(NSString *)blessWorld
                                redID:(NSString *)redID
                             toUserId:(NSString *)touserId
                               toUser:(LTUser *)toUser
                             chatType:(LTChatType)chattype
                           messageExt:(NSDictionary *)messageExt;

//发红包()
+(LTMessage *)sendLunkMoneyMessage:(NSString *)blessWorld
                            orderId:(NSString *)orderId
                          toUserId:(NSString *)touserId
                            toUser:(LTUser *)toUser
                          chatType:(LTChatType)chattype
                        messageExt:(NSDictionary *)messageExt;


//发送名片
+ (LTMessage *)sendPresonCardMessage:(LTUser *)cardUser
                            toUserId:(NSString *)touserId
                              toUser:(LTUser *)toUser
                            chatType:(LTChatType)chattype
                          messageExt:(NSDictionary *)messageExt;



//发送红包已领取的消息
+(LTMessage *)sendLuckMoneyGetMessage:(NSString *)operationname
                      operationresult:(NSString *)operationresult
                             toUserId:(NSString *)groupId
                               toUser:(LTUser *)toUser
                             chatType:(LTChatType)chatType
                           messageExt:(NSDictionary *)messageExt;

//转账消息
+(LTMessage *)sendETHTransferId:(NSString *)transferId
                        remark:(NSString *)remark
                 transferMoney:(NSString *)transferMoney
                          unit:(NSString *)unit
                        toUser:(LTUser *)toUser;

//发送群操作消息
+ (LTMessage *)sendGroupOperationMessage:(NSString *)operationname
                         operationresult:(NSString *)operationresult
                                toUserId:(NSString *)groupId
                                  toUser:(LTUser *)toUser
                             messageType:(LTMessageType)messageType
                              messageExt:(NSDictionary *)messageExt;

//发送消息撤回消息
+ (LTMessage *)sendRevokeMessageWithMessageID:(NSString *)revokeMessageId
                                     toUserId:(NSString *)toUserId
                                       toUser:(LTUser *)toUser
                                     chatType:(LTChatType)chattype;


//本地插入消息撤回的UI展示消息
+ (LTMessage *)makeRevkeUIMessageWithtoUserId:(NSString *)toUserId
                                       toUser:(LTUser *)toUser
                                     chatType:(LTChatType)chattype;


//发送消息是发现没有权限提示自己没有权限的消息
+ (LTMessage *)makeNOPermissionUIMessageWithUserId:(NSString *)toUserId
                                            toUser:(LTUser *)toUser
                                          chatType:(LTChatType)chattype;





//群主踢人消息
+(LTMessage *)sendKickedOutgroupMessageWithUser:(LTUser *)kickedUser
                                        groupId:(NSString *)groupId;


//发送call提示消息
+(LTMessage *)sendCallTipMessage:(LTUser *)toUser
                            type:(CallType)type
                          status:(CallStatus)status
                    callDuration:(NSString *)callDuration;

//截屏通知消息
+(LTMessage *)sendScreenshotName:(NSString *)name
                          result:(NSString *)result
                          toUser:(LTUser *)toUser
                        chatType:(LTChatType)chattype;

//直播间里面普通聊天消息
+(LTMessage *)sendChatRoomNoramlMessage:(NSString *)content roomId:(NSString *)roomId;
//直播间点亮消息
+(LTMessage *)sendLightUpMessageRoomId:(NSString *)roomId isFrist:(BOOL)frist;
//直播间里面弹幕消息
+(LTMessage *)sendChatRoomBarrageMessage:(NSString *)content roomId:(NSString *)roomId;


//直播间的礼物消息
+(LTMessage *)sendGiftMessageWithGiftModel:(giftModel *)giftmodel roomId:(NSString *)roomId;



//主播关闭直播消息
+(LTMessage *)sendCloseLiveMessageRoomId:(NSString *)roomId;


+(LTMessage *)sendJoinRoomMessageRoomId:(NSString *)roomId;

+(LTMessage *)sendRoomMessageRoomId:(NSString *)roomId
                      operationUser:(LTUser *)operationUser
                        messagetype:(LTMessageType)type;

+(LTMessage *)updateRoomTitleMessageRoomId:(NSString *)roomId
                                     title:(NSString *)title;

+(LTMessage *)focusHostMessageRoomId:(NSString *)roomId;

@end
